<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>AdminLTE 2 | Starter</title>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="/stylesheets/bootstrap.min.css">
  <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="/stylesheets/ionicons.min.css">
  <link rel="stylesheet" href="/stylesheets/AdminLTE.min.css">
  <link rel="stylesheet" href="/stylesheets/skins/skin-blue.min.css">
  <link rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>

<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
  <%-  include("./header.ejs") %>
  <%- include("./sidebar.ejs") %>
  <div class="content-wrapper">
    <section class="content-header">
      <h1>
        商品管理
 
            <a href="/pro/add" class="btn btn-info btn-xs">添加商品</a>
        
      </h1>
      
    </section>
    <section class="content container-fluid">
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">商品信息</h3>
          <div class="box-tools">
            <form action="/pro/search" method="get">
            <div class="input-group input-group-sm" style="width: 150px;">
                   <!-- {search:'小米手机10'} -->
                  <input type="text" name="search" id="search" class="form-control pull-right" placeholder="Search666">
                  <div class="input-group-btn">
                    <button type="submit" class="btn btn-default"><i class="fa fa-search"></i>按钮</button>
                  </div>
                
            </div>
          </form>
          </div>
        </div>
        <div class="box-body table-responsive no-padding">
          <table class="table table-hover">
            <tbody>
              <tr>
                <th>序号</th>
                <th>名称</th>
                <th>分类</th>
                <th>品牌</th>
                <th>logo</th>
                <th>图片</th>
                <th>价格</th>
                <th>介绍</th>
                <th>库存</th>
                <th>折扣</th>
                <th>评分</th>
                <th>操作</th>
              </tr>

              <% for(var i=0;i<data.length;i++){ %>
                <tr>
                    <td><%= data[i]._id%></td>
                    <td><%= data[i].proName %></td>
                    <td><%= data[i].column %></td>
                    <td><%= data[i].brand %></td>
                    <td><img width="40" src="<%= data[i].logo %>" alt=""></td>
                    <td><img width="40" src="<%= data[i].proImg %>" alt=""></td>
                    <td><%= data[i].price %></td>
                    <td><%= data[i].introduce %></td>
                    <td><%= data[i].stock %></td>
                    <td><%= data[i].discount %></td>
                    <td><%= data[i].score %></td>
                    <td>
                        <!-- <button type="button" class="btn btn-warning btn-sm" style="width:50px">修改</button> -->
                        <!-- <button type="button" class="btn btn-danger btn-sm" style="width:50px">删除</button> -->
                        <a  href="/pro/update?_id=<%=data[i]._id%>" class="btn btn-warning btn-sm" style="width:50px">修改</a>
                        <a href="/pro/delete?_id=<%=data[i]._id%>" class="btn btn-danger btn-sm" style="width:50px">删除</a>
                    </td>
                  </tr>
              <% } %>
              
            </tbody>
          </table>
        </div>

      </div>
    </section>

  </div>
  <%- include("./footer.ejs") %>
  <div class="control-sidebar-bg"></div>
</div>

<script src="/javascripts/jquery.min.js"></script>

<script src="/javascripts/bootstrap.min.js"></script>

<script src="/javascripts/adminlte.min.js"></script>

</body>
</html>